using UnityEngine;
using System.Collections;

public class Particle_TextControl : MonoBehaviour {

	// Use this for initialization
	
	int pos;
    int splashIconSizeH;
	public Texture2D pic_add;
	Transform m_transform;

	void Start ()
	{
        splashIconSizeH = (int)(Screen.height * 0.08F);
		pos = (int)(Screen.height *0.5F );
		m_transform = this.transform;
	}

	void OnGUI()
	{

		pos-=2;
		GUI.DrawTexture(new Rect((int)(Camera.main.WorldToScreenPoint(m_transform.position).x ), pos , splashIconSizeH*2 , splashIconSizeH),pic_add);
		//GUI.DrawTexture(new Rect(Screen.width / 2 - 10 , pos , 64 , 32) , pic_add);
		if (pos <= 0)
		{
			Destroy(this.gameObject);
		}
		//GUI.Label(new Rect(Screen.width / 2 - 10 , pos , 20 , 25) , "+2");

	}

	
}
